/**
 * Created by Administrator on 2017/07/17 0017.
 */

import React from 'react'
import {ScrollView,Text} from 'react-native'
import {NavigationActions} from 'react-navigation'
export default class ModuleRoot extends React.Component{

    static navigationOptions = ({navigation}) =>({
        headerStyle:{
            height:0
        }
    })
    render(){
        return(
            <ScrollView>
                <Text style={{height:50, color:'#ff6a7f',fontSize:16}} onPress={()=>{
                    this.props.navigation.navigate('useFlatList')
                }}>FlatList使用</Text>
                <Text style={{height:50, color:'#ff6a7f',fontSize:16}}
                      onPress={()=>{
                          this.props.navigation.dispatch(resetActions)
                      }}>Navigation使用</Text>
                <Text style={{height:50, color:'#ff6a7f',fontSize:16}} onPress={()=>{
                        this.props.navigation.navigate('storagePage');
                }}>持久化数据存储</Text>

                <Text style={{height:50, color:'#ff6a7f',fontSize:16}} onPress={()=>{
                    this.props.navigation.navigate('swiperPage');
                }}>swiper使用</Text>
            </ScrollView>
        )
    }


}

const resetActions = NavigationActions.reset({
    index:0,
    actions:[
        NavigationActions.navigate({routeName:'page1'},{userInfo:'我操你妈逼'})
    ]
})


